<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script> 
    console.log(parseFloat("123abc"));//返回123
    console.log(parseFloat("0xA"));//返回0
    console.log(parseFloat("12.5"));//返回12.5
    console.log(parseFloat("12.23.34"));//返回12.23
    console.log(parseFloat("098.12"));//返回98.12
    </script>
</body>
</html>